//
//  LXCityCollectionCell.swift
//  LXReuseTools_Example
//
//  Created by yoctech on 2021/11/22.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import UIKit

class LXCityCollectionCell: UICollectionViewCell {
    lazy var textBtn: UIButton = {
        let obj = UIButton()
        obj.setTitleColor(UIColor.lightText, for: .disabled)
        obj.setTitleColor(UIColor.lightGray, for: .normal)
        obj.setTitleColor(UIColor.darkText, for: .selected)
        obj.titleLabel?.font = UIFont.font(14)
        return obj
    }()
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setupUI()
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI() {
        self.contentView.addSubview(textBtn)
        textBtn.translatesAutoresizingMaskIntoConstraints = false
        
        textBtn.topAnchor.constraint(equalTo: contentView.topAnchor).isActive = true
        textBtn.leftAnchor.constraint(equalTo: contentView.leftAnchor).isActive = true
        textBtn.bottomAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true
        textBtn.rightAnchor.constraint(equalTo: contentView.rightAnchor).isActive = true

    }
}
